using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScoreRecorder
{
    public int score; 

    public ScoreRecorder()
    {
        score = 0;
    }

    public void Record(DiskData disk)
    {
        int diskSize = disk.size;
        switch (diskSize)
        {
            case 1:
                score += 3;
                break;
            case 2:
                score += 2;
                break;
            case 3:
                score += 1;
                break;
            default: break;
        }

        score += disk.speed;

        string diskColor = disk.color;
        if (diskColor.CompareTo("red") == 0)
        {
            score += 1;
        }
        else if (diskColor.CompareTo("green") == 0)
        {
            score += 2;
        }
        else if (diskColor.CompareTo("blue") == 0)
        {
            score += 3;
        }
    }

    public void Reset()
    {
        score = 0;
    }
}
